package Exercise1;

import com.sun.org.apache.xpath.internal.operations.String;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class IOTest {
    public static void main(String args[]) {
        BufferedReader bfr=null;
        java.lang.String len="";
        int lenNum=0;
        try {
            bfr = new BufferedReader(new FileReader("com.guigu.IO\\Exercise.txt"));
            while ((len = bfr.readLine())!=null)
            {
                System.out.println(++lenNum+len);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if(bfr!=null)
            {
                try {
                    bfr.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}